import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by 肖浩容 on 2017/1/8.
 */
public class hottestAVs {
    public static void main(String[] args){
            List hottestAVs = new ArrayList();
            Connection connection = Database.getConn();
            PreparedStatement preparedStatement = null;
            //按顺序将数组中的数据储存到数据库中
        /*for(int x=0;x<20;x++){
            //System.out.println(imgCrawIdList1.get(x));
            //System.out.println(imgCrawIdList2.get(x));
            //System.out.println(imgCrawIdList3.get(x));
            //System.out.println(imgCrawIdList4.get(x));
            //System.out.println(String.valueOf(imgCrawIdList5.get(x)));
            //Interface.Insert_sb(String.valueOf(imgCrawIdList1.get(x)), String.valueOf(imgCrawIdList2.get(x)), String.valueOf(imgCrawIdList3.get(x)), String.valueOf(imgCrawIdList4.get(x)), Integer.parseInt(String.valueOf(imgCrawIdList5.get(x))), connection, preparedStatement);
            //sb++;
            //System.out.println(sb);
        }*/
            hottestAVs = Interface.FindHottest(connection, preparedStatement);
            Database.close(connection, null, preparedStatement, null);
            for(int i =0;i<hottestAVs.size();i++){
                System.out.println(hottestAVs.get(i));
            }
            System.out.println("共"+hottestAVs.size()+"条记录");
    }

}
